//
//  JobCollectionViewCell.m
//  Btpin
//
//  Created by Vic on 2019/12/12.
//  Copyright © 2019 Vic. All rights reserved.
//


#import "JobCollectionViewCell.h"

@interface JobCollectionViewCell ()
{
    UILabel *titleLbl;
    
    UILabel *addrLbl;
    UILabel *expLbl;
    UILabel *eduLbl;
    
    UILabel *companyNameLbl;
    UIImageView *integrityTagImgView;
    UILabel *companyInfoLbl;
    UIImageView *headerImgView;
    UILabel *hrLbl;
    UILabel *wageLbl;
    UILabel *timeLbl;
}
@end

@implementation JobCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}
- (void)initUI {
    self.bgView = [UIToolsControl initViewWithFrame:CGRectMake(ScalePS(10), 0, WIDTH-ScalePS(20), ScalePS(130)) backgroundColor:COLOR_OF_WHITE];
    [self.contentView addSubview:self.bgView];
    [self.bgView corners:(UIRectCornerTopLeft | UIRectCornerTopRight) radii:CGSizeMake(ScalePS(8), ScalePS(8))];
    
    CALayer *subLayer = [UIView setCornerAndshadowForViewFrame:self.bgView.frame cornerRadius:ScalePS(8) backgroundColor:COLOR_OF_WHITE shadowColor:THEMECOLOR_OF_TEXT_cccccc shadowOffset:CGSizeMake(0, -1) shadowOpacity:0.7 shadowRadius:ScalePS(3)];
    [self.contentView.layer insertSublayer:subLayer below:self.bgView.layer];
    
    
    titleLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(10), 10*Scale, WIDTH-120*Scale, 30*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_18];
    titleLbl.font = FontBold(Font_18);
    [self.bgView addSubview:titleLbl];
    
    addrLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(10), EndY(titleLbl), 10, ScalePS(20)) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_10];
    addrLbl.textAlignment = NSTextAlignmentCenter;
    addrLbl.backgroundColor = [UIColor colorWithWhite:0 alpha:0.2];
    addrLbl.layer.cornerRadius = ScalePS(10);
    addrLbl.layer.masksToBounds = YES;
    [self.bgView addSubview:addrLbl];
    
    expLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(addrLbl)+ScalePS(5), StartY(addrLbl), 10, ScalePS(20)) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_10];
    expLbl.backgroundColor = [UIColor colorWithWhite:0 alpha:0.2];
    expLbl.textAlignment = NSTextAlignmentCenter;
    expLbl.layer.cornerRadius = ScalePS(10);
    expLbl.layer.masksToBounds = YES;
    [self.bgView addSubview:expLbl];
    
    eduLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(expLbl)+ScalePS(5), StartY(addrLbl), 10, ScalePS(20)) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_10];
    eduLbl.textAlignment = NSTextAlignmentCenter;
    eduLbl.backgroundColor = [UIColor colorWithWhite:0 alpha:0.2];
    eduLbl.layer.cornerRadius = ScalePS(10);
    eduLbl.layer.masksToBounds = YES;
    [self.bgView addSubview:eduLbl];
    
    headerImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(StartX(titleLbl), EndY(addrLbl)+10*Scale, 30*Scale, 30*Scale) imageName:@"logo_bg"];
    headerImgView.backgroundColor = THEMECOLOR_OF_TEXT_cccccc;
    headerImgView.contentMode = UIViewContentModeScaleAspectFill;
    headerImgView.layer.cornerRadius = ScalePS(6);
    headerImgView.layer.masksToBounds = YES;
    [self.bgView addSubview:headerImgView];
    
    companyNameLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(headerImgView)+10*Scale, StartY(headerImgView), 100, 20*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_15];
    [self.bgView addSubview:companyNameLbl];
    
    integrityTagImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(EndX(companyNameLbl)+2, StartY(companyNameLbl)+3*Scale, 14*Scale, 14*Scale) imageName:@"integrity_tag"];
    integrityTagImgView.hidden = YES;
    [self.bgView addSubview:integrityTagImgView];
    
    companyInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(companyNameLbl), EndY(companyNameLbl), WIDTH-80*Scale, 15*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_11];
    [self.bgView addSubview:companyInfoLbl];
    
    wageLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ViewWidth(self.bgView)-160*Scale, 20*Scale, 150*Scale, 17*Scale) text:nil textColor:THEMECOLOR_OF_ORANGE font:Font_15];
    wageLbl.textAlignment = NSTextAlignmentRight;
    [self.bgView addSubview:wageLbl];
    
    timeLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(wageLbl), EndY(wageLbl)+5*Scale, ViewWidth(wageLbl), ViewHeight(wageLbl)) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_12];
    timeLbl.textAlignment = NSTextAlignmentRight;
    [self.bgView addSubview:timeLbl];
    timeLbl.hidden = YES;
}
- (void)reloadDataModel:(CompanyJobModel *)model indexPath:(nonnull NSIndexPath *)indexPath {
    UIColor *tagBgColor = RGB(239, 239, 239);
//    switch (indexPath.row%5) {
//        case 0: {
//            self.bgView.backgroundColor = RGB(255, 118, 108);
//            tagBgColor = RGB(254, 86, 77);
//        } break;
//        case 1: {
//            self.bgView.backgroundColor = RGB(187, 104, 252);
//            tagBgColor = RGB(164, 54, 254);
//        } break;
//        case 2: {
//            self.bgView.backgroundColor = RGB(255, 137, 67);
//            tagBgColor = RGB(254, 112, 25);
//        } break;
//        case 3: {
//            self.bgView.backgroundColor = RGB(2, 168, 252);
//            tagBgColor = RGB(21, 120, 253);
//        } break;
//        case 4: {
//            self.bgView.backgroundColor = RGB(254, 187, 57);
//            tagBgColor = RGB(254, 163, 2);
//        } break;
//        default:
//            break;
//    }
    
    titleLbl.text = model.title;
    
    CGFloat addrWidth = [UIToolsControl textWidth:model.district_cn size:CGSizeMake(MAXFLOAT, ScalePS(20)) font:Font_10]+ScalePS(20);
    addrLbl.frame = CGRectMake(ScalePS(10), EndY(titleLbl), addrWidth, ScalePS(20));
    addrLbl.text = model.district_cn;
    addrLbl.backgroundColor = tagBgColor;
    
    CGFloat expWidth = [UIToolsControl textWidth:model.experience_cn size:CGSizeMake(MAXFLOAT, ScalePS(20)) font:Font_10]+ScalePS(20);
    expLbl.frame = CGRectMake(EndX(addrLbl)+ScalePS(5), StartY(addrLbl), expWidth, ScalePS(20));
    expLbl.text = model.experience_cn;
    expLbl.backgroundColor = tagBgColor;
    
    if (model.education_cn && model.education_cn.length) {
        CGFloat eduWidth = [UIToolsControl textWidth:model.education_cn size:CGSizeMake(MAXFLOAT, ScalePS(20)) font:Font_10]+ScalePS(20);
        eduLbl.frame = CGRectMake(EndX(expLbl)+ScalePS(5), StartY(addrLbl), eduWidth, ScalePS(20));
        eduLbl.text = model.education_cn;
        eduLbl.backgroundColor = tagBgColor;
        eduLbl.hidden = NO;
    } else {
        eduLbl.hidden = YES;
    }
    
    
    NSString *companyName = model.company_name;
    companyNameLbl.text = companyName;
    companyInfoLbl.text = [NSString stringWithFormat:@"%@ %@ %@", model.finance_cn, model.scale_cn, model.trade_cn];
    if (model.company_logo && model.company_logo.length) {
        [headerImgView sd_setImageWithURL:[NSURL URLWithString:model.company_logo] placeholderImage:[UIImage imageNamed:@"header_bg"]];
    } else {
        headerImgView.image = [UIImage imageNamed:@"header_bg"];
    }
    hrLbl.text = [NSString stringWithFormat:@"%@·%@", model.hrInfoModel.name, model.hrInfoModel.position];
    wageLbl.text = model.wage_cn;
    timeLbl.text = model.update_timeMMDD;
    
    CGFloat width = [UIToolsControl textWidth:companyName size:CGSizeMake(MAXFLOAT, 20*Scale) font:Font_15]+1;
    companyNameLbl.frame = CGRectMake(EndX(headerImgView)+10*Scale, StartY(headerImgView), MIN(width, WIDTH-100*Scale), 20*Scale);
    integrityTagImgView.frame = CGRectMake(EndX(companyNameLbl)+2, StartY(companyNameLbl)+3*Scale, 14*Scale, 14*Scale);
    if (model.company_auth_medal && model.company_auth_medal.length && [model.company_auth_medal isEqualToString:@"1"]) {
        integrityTagImgView.hidden = NO;
    } else {
        integrityTagImgView.hidden = YES;
    }
}

@end





/*
#import "JobCollectionViewCell.h"

@interface JobCollectionViewCell ()
{
    UILabel *titleLbl;
    
    UILabel *addrLbl;
    UILabel *expLbl;
    UILabel *eduLbl;
    
    UILabel *companyNameLbl;
    UIImageView *integrityTagImgView;
    UILabel *companyInfoLbl;
    UIImageView *headerImgView;
    UILabel *hrLbl;
    UILabel *wageLbl;
    UILabel *timeLbl;
}
@end

@implementation JobCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}
- (void)initUI {
//    self.bgView = [UIToolsControl initViewWithFrame:CGRectMake(ScalePS(10), 0, WIDTH-ScalePS(20), ScalePS(130)) backgroundColor:COLOR_OF_WHITE];
    self.bgView = [UIToolsControl initViewWithFrame:CGRectMake(ScalePS(10), 0, WIDTH-ScalePS(20), ScalePS(120)) backgroundColor:COLOR_OF_WHITE];
    [self.contentView addSubview:self.bgView];
//    [self.bgView corners:(UIRectCornerTopLeft | UIRectCornerTopRight) radii:CGSizeMake(ScalePS(8), ScalePS(8))];
    
    
    self.bgView.layer.cornerRadius = ScalePS(12);
    self.bgView.layer.masksToBounds = YES;
    self.bgView.layer.borderWidth = 1;
    self.bgView.layer.borderColor = THEMECOLOR_OF_ORANGE.CGColor;
    
    
//    titleLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(10), 10*Scale, WIDTH-120*Scale, 30*Scale) text:nil textColor:COLOR_OF_WHITE font:Font_18];
    titleLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(10), 10*Scale, WIDTH-120*Scale, 30*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_18];
    titleLbl.font = FontBold(Font_18);
    [self.bgView addSubview:titleLbl];
    
    addrLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(10), EndY(titleLbl)+ScalePS(2), 10, ScalePS(20)) text:nil textColor:COLOR_OF_WHITE font:Font_10];
    addrLbl.textAlignment = NSTextAlignmentCenter;
    addrLbl.backgroundColor = [UIColor colorWithWhite:0 alpha:0.2];
    addrLbl.layer.cornerRadius = ScalePS(10);
    addrLbl.layer.masksToBounds = YES;
    [self.bgView addSubview:addrLbl];
    
    expLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(addrLbl)+ScalePS(5), StartY(addrLbl), 10, ScalePS(20)) text:nil textColor:COLOR_OF_WHITE font:Font_10];
    expLbl.backgroundColor = [UIColor colorWithWhite:0 alpha:0.2];
    expLbl.textAlignment = NSTextAlignmentCenter;
    expLbl.layer.cornerRadius = ScalePS(10);
    expLbl.layer.masksToBounds = YES;
    [self.bgView addSubview:expLbl];
    
    eduLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(expLbl)+ScalePS(5), StartY(addrLbl), 10, ScalePS(20)) text:nil textColor:COLOR_OF_WHITE font:Font_10];
    eduLbl.textAlignment = NSTextAlignmentCenter;
    eduLbl.backgroundColor = [UIColor colorWithWhite:0 alpha:0.2];
    eduLbl.layer.cornerRadius = ScalePS(10);
    eduLbl.layer.masksToBounds = YES;
    [self.bgView addSubview:eduLbl];
    
    headerImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(StartX(titleLbl), EndY(addrLbl)+10*Scale, 40*Scale, 40*Scale) imageName:@"header_bg"];
    headerImgView.backgroundColor = THEMECOLOR_OF_TEXT_cccccc;
    headerImgView.contentMode = UIViewContentModeScaleAspectFit;
    headerImgView.layer.cornerRadius = ScalePS(6);
    headerImgView.layer.masksToBounds = YES;
    [self.bgView addSubview:headerImgView];
    
//    companyNameLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(headerImgView)+10*Scale, StartY(headerImgView), 100, 20*Scale) text:nil textColor:COLOR_OF_WHITE font:Font_15];
    companyNameLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(headerImgView)+10*Scale, StartY(headerImgView), 100, 20*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_15];
    [self.bgView addSubview:companyNameLbl];
    
    integrityTagImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(EndX(companyNameLbl)+2, StartY(companyNameLbl)+3*Scale, 14*Scale, 14*Scale) imageName:@"integrity_tag"];
    integrityTagImgView.hidden = YES;
    [self.bgView addSubview:integrityTagImgView];
    
//    companyInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(companyNameLbl), EndY(companyNameLbl), WIDTH-80*Scale, 15*Scale) text:nil textColor:COLOR_OF_WHITE font:Font_11];
    companyInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(companyNameLbl), EndY(companyNameLbl), WIDTH-80*Scale, 15*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_11];
    [self.bgView addSubview:companyInfoLbl];
    
//    wageLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ViewWidth(self.bgView)-160*Scale, 20*Scale, 150*Scale, 17*Scale) text:nil textColor:COLOR_OF_WHITE font:Font_15];
    wageLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ViewWidth(self.bgView)-170*Scale, 20*Scale, 150*Scale, 17*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_9a9a9a font:Font_15];
    wageLbl.textAlignment = NSTextAlignmentRight;
    [self.bgView addSubview:wageLbl];
    
    timeLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(wageLbl), EndY(wageLbl)+5*Scale, ViewWidth(wageLbl), ViewHeight(wageLbl)) text:nil textColor:COLOR_OF_WHITE font:Font_12];
    timeLbl.textAlignment = NSTextAlignmentRight;
    [self.bgView addSubview:timeLbl];
    timeLbl.hidden = YES;
}
- (void)reloadDataModel:(CompanyJobModel *)model indexPath:(nonnull NSIndexPath *)indexPath {
    UIColor *tagBgColor = THEMECOLOR_OF_ORANGE;
//    switch (indexPath.row%5) {
//        case 0: {
//            self.bgView.backgroundColor = RGB(255, 118, 108);
//            tagBgColor = RGB(254, 86, 77);
//        } break;
//        case 1: {
//            self.bgView.backgroundColor = RGB(187, 104, 252);
//            tagBgColor = RGB(164, 54, 254);
//        } break;
//        case 2: {
//            self.bgView.backgroundColor = RGB(255, 137, 67);
//            tagBgColor = RGB(254, 112, 25);
//        } break;
//        case 3: {
//            self.bgView.backgroundColor = RGB(2, 168, 252);
//            tagBgColor = RGB(21, 120, 253);
//        } break;
//        case 4: {
//            self.bgView.backgroundColor = RGB(254, 187, 57);
//            tagBgColor = RGB(254, 163, 2);
//        } break;
//        default:
//            break;
//    }
    
    titleLbl.text = model.title;
    
    CGFloat addrWidth = [UIToolsControl textWidth:model.district_cn size:CGSizeMake(MAXFLOAT, ScalePS(20)) font:Font_10]+ScalePS(20);
    addrLbl.frame = CGRectMake(ScalePS(10), EndY(titleLbl)+ScalePS(2), addrWidth, ScalePS(20));
    addrLbl.text = model.district_cn;
    addrLbl.backgroundColor = tagBgColor;
    
    CGFloat expWidth = [UIToolsControl textWidth:model.experience_cn size:CGSizeMake(MAXFLOAT, ScalePS(20)) font:Font_10]+ScalePS(20);
    expLbl.frame = CGRectMake(EndX(addrLbl)+ScalePS(5), StartY(addrLbl), expWidth, ScalePS(20));
    expLbl.text = model.experience_cn;
    expLbl.backgroundColor = tagBgColor;
    
    if (model.education_cn && model.education_cn.length) {
        CGFloat eduWidth = [UIToolsControl textWidth:model.education_cn size:CGSizeMake(MAXFLOAT, ScalePS(20)) font:Font_10]+ScalePS(20);
        eduLbl.frame = CGRectMake(EndX(expLbl)+ScalePS(5), StartY(addrLbl), eduWidth, ScalePS(20));
        eduLbl.text = model.education_cn;
        eduLbl.backgroundColor = tagBgColor;
        eduLbl.hidden = NO;
    } else {
        eduLbl.hidden = YES;
    }
    
    
    NSString *companyName = model.company_name;
    companyNameLbl.text = companyName;
    companyInfoLbl.text = [NSString stringWithFormat:@"%@ %@ %@", model.finance_cn, model.scale_cn, model.trade_cn];
    if (model.company_logo && model.company_logo.length) {
        [headerImgView sd_setImageWithURL:[NSURL URLWithString:model.company_logo] placeholderImage:[UIImage imageNamed:@"header_bg"]];
    } else {
        headerImgView.image = [UIImage imageNamed:@"header_bg"];
    }
    hrLbl.text = [NSString stringWithFormat:@"%@·%@", model.hrInfoModel.name, model.hrInfoModel.position];
    wageLbl.text = model.wage_cn;
    timeLbl.text = model.update_timeMMDD;
    
    CGFloat width = [UIToolsControl textWidth:companyName size:CGSizeMake(MAXFLOAT, 20*Scale) font:Font_15]+1;
    companyNameLbl.frame = CGRectMake(EndX(headerImgView)+10*Scale, StartY(headerImgView), MIN(width, WIDTH-100*Scale), 20*Scale);
    integrityTagImgView.frame = CGRectMake(EndX(companyNameLbl)+2, StartY(companyNameLbl)+3*Scale, 14*Scale, 14*Scale);
    if (model.company_auth_medal && model.company_auth_medal.length && [model.company_auth_medal isEqualToString:@"1"]) {
        integrityTagImgView.hidden = NO;
    } else {
        integrityTagImgView.hidden = YES;
    }
}

@end
*/







/*
#import "JobCollectionViewCell.h"

@interface JobCollectionViewCell ()
{
    UILabel *titleLbl;
    UILabel *baseInfoLbl;
    UILabel *companyNameLbl;
    UIImageView *integrityTagImgView;
    UILabel *companyInfoLbl;
    UIImageView *headerImgView;
    UILabel *hrLbl;
    UILabel *wageLbl;
    UILabel *timeLbl;
}
@end

@implementation JobCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}
- (void)initUI {
    titleLbl = [UIToolsControl initLabelWithFrame:CGRectMake(LeftSpace, 15*Scale, WIDTH-100*Scale, 30*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_18];
    titleLbl.font = FontBold(Font_18);
    [self.contentView addSubview:titleLbl];
    
    baseInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(titleLbl), EndY(titleLbl), ViewWidth(titleLbl), 25*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_13];
    [self.contentView addSubview:baseInfoLbl];
    
    headerImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(StartX(titleLbl), EndY(baseInfoLbl)+10*Scale, 40*Scale, 40*Scale) imageName:@"header_bg"];
    headerImgView.contentMode = UIViewContentModeScaleAspectFit;
    headerImgView.layer.cornerRadius = 20*Scale;
    headerImgView.layer.masksToBounds = YES;
    [self.contentView addSubview:headerImgView];
    
    companyNameLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(headerImgView)+10*Scale, StartY(headerImgView), 100, 25*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_15];
    [self.contentView addSubview:companyNameLbl];
    
    integrityTagImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(EndX(companyNameLbl)+2, StartY(companyNameLbl)+3*Scale, 14*Scale, 14*Scale) imageName:@"integrity_tag"];
    integrityTagImgView.hidden = YES;
    [self.contentView addSubview:integrityTagImgView];
    
    companyInfoLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(companyNameLbl), EndY(companyNameLbl), WIDTH-80*Scale, 15*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_13];
    [self.contentView addSubview:companyInfoLbl];
    
//    hrLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(headerImgView)+10*Scale, StartY(headerImgView), 200, ViewHeight(headerImgView)) text:nil textColor:THEMECOLOR_OF_TEXT_333333 font:Font_12];
//    [self.contentView addSubview:hrLbl];
    
    wageLbl = [UIToolsControl initLabelWithFrame:CGRectMake(WIDTH-200*Scale, 20*Scale, 185*Scale, 17*Scale) text:nil textColor:THEMECOLOR_OF_RED font:Font_15];
    wageLbl.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:wageLbl];
    
    timeLbl = [UIToolsControl initLabelWithFrame:CGRectMake(StartX(wageLbl), EndY(wageLbl)+5*Scale, ViewWidth(wageLbl), ViewHeight(wageLbl)) text:nil textColor:THEMECOLOR_OF_TEXT_cccccc font:Font_12];
    timeLbl.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:timeLbl];
    
    UIView *lineView = [UIToolsControl initViewWithFrame:CGRectMake(0, EndY(headerImgView)+18*Scale, WIDTH, 8*Scale) backgroundColor:THEMECOLOR_OF_GRAY];
    [self.contentView addSubview:lineView];
}
- (void)reloadDataModel:(CompanyJobModel *)model {
    titleLbl.text = model.title;
    baseInfoLbl.text = [NSString stringWithFormat:@"%@ | %@ | %@", model.district_cn, model.experience_cn, model.education_cn];
    
    NSString *companyName = model.company_name;
    companyNameLbl.text = companyName;
    companyInfoLbl.text = [NSString stringWithFormat:@"%@ | %@ | %@", model.finance_cn, model.scale_cn, model.trade_cn];
    if (model.company_logo && model.company_logo.length) {
        [headerImgView sd_setImageWithURL:[NSURL URLWithString:model.company_logo] placeholderImage:[UIImage imageNamed:@"header_bg"]];
    } else {
        headerImgView.image = [UIImage imageNamed:@"header_bg"];
    }
    hrLbl.text = [NSString stringWithFormat:@"%@·%@", model.hrInfoModel.name, model.hrInfoModel.position];
    wageLbl.text = model.wage_cn;
    timeLbl.text = model.update_timeMMDD;
    
    CGFloat width = [UIToolsControl textWidth:companyName size:CGSizeMake(MAXFLOAT, 20*Scale) font:Font_15]+1;
    companyNameLbl.frame = CGRectMake(EndX(headerImgView)+10*Scale, StartY(headerImgView), MIN(width, WIDTH-100*Scale), 20*Scale);
    integrityTagImgView.frame = CGRectMake(EndX(companyNameLbl)+2, StartY(companyNameLbl)+3*Scale, 14*Scale, 14*Scale);
    if (model.company_auth_medal && model.company_auth_medal.length && [model.company_auth_medal isEqualToString:@"1"]) {
        integrityTagImgView.hidden = NO;
    } else {
        integrityTagImgView.hidden = YES;
    }
//    companyInfoLbl.frame = CGRectMake(EndX(integrityTagImgView)+3, EndY(baseInfoLbl)+8*Scale, 200, 15*Scale);
}

@end
*/
